<?php
    /**
    * Cases delete
    */
    if (!defined('EXPONENT')) exit('');
    if (exponent_users_isAdmin() ||  exponent_permissions_check(array("administrate","delete"),exponent_core_makeLocation("profilemodule","_syscore","")))
    {
        if (isset($_REQUEST['id']))
        {
            $id=intval($_REQUEST['id']);
            $db->delete('profilemodule_cases', 'id = '.$id);
        }
        echo "OK";
    }
    else
        exponent_http_error(403);

?>
